<template>
  <div>
    <h3>小三组件</h3>
    <div>金钱：{{ money }}</div>
    <div>私房钱：300</div>
    <button>买包-50</button>
    <button @click="lookAsync(500)">美容-500</button>
  </div>
</template>

<script>
import { mapActions, mapState } from "vuex";
export default {
  computed: {
    ...mapState(["money"]),
  },
  methods: {
    //actions的辅助函数
    ...mapActions(["lookAsync"]),
    // look() {
    //   this.$store.dispatch("lookAsync", 500);
    // },
  },
};
</script>

<style></style>
